﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using metroCIS.Library;

namespace metroCIS.ViewModel
{
    public class LvInfoViewModel
    {
        public ObservableCollection<LVInfo> Lessons { get; private set; }
        public LvInfoViewModel()
        {
            Lessons = new ObservableCollection<LVInfo>();
            Refresh();
        }

        private async void Refresh()
        {
            var manager = CisManager.Create();
            Lessons.Clear();
            foreach (var item in await manager.GetLvInfo())
            {
                Lessons.Add(item);
            }
        }
    }
}
